Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

vcpu: Update EFER state for set/get_regs #214

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VelocityRa
Copy link

HAXM didn't return the correct EFER value (tested on the same guest code against WHPX).
Without this you can only get it by reading the MSR directly.

Co-authored-by: Jake Arveson <[email protected]>
Signed-off-by: Nick Renieris <[email protected]>
@hyuan3
Copy link
Contributor

hyuan3 commented Jun 20, 2019

Looks good to me. Thanks for the patch.

Reviewed-by: Hang Yuan [email protected]

@HaxmCI HaxmCI added CI:Build Pass CI:Build Pass CI:Mac Test Pass CI:Mac Test Pass labels Jun 20, 2019
@coxuintel
Copy link
Contributor

HAXM didn't return the correct EFER value (tested on the same guest code against WHPX).
Without this you can only get it by reading the MSR directly.

Is there any specific failure if missing this?

@VelocityRa
Copy link
Author

VelocityRa commented Jun 20, 2019

@coxuintel The guest I tested this on is really barebones (the entirety of the code is pretty close to this: https://wiki.osdev.org/Entering_Long_Mode_Directly) so I'm not entirely sure, but it seems like there's no failure guest-side without this, based on some testing by writing to registers after long mode is initialized.

@nevilad
Copy link
Contributor

nevilad commented Feb 28, 2020

@coxuintel if missing this snapshot loading may not update EFER. But it doesn't work anyway (see #248).

@VelocityRa
Copy link
Author

Bump?

@wcwang
Copy link
Contributor

wcwang commented Oct 14, 2020

Sorry for late response. Do you remember that your test cases can be passed on WHPX but not on HAXM when invoking HAX_VCPU_SET_REGS? Furthermore, in your patch, we noticed that you updated the entire EFER bits on this occasion. But maybe some bits are not allowed to set according to HAXM current implementation. Meanwhile, we will consider to prepare full test on your pull request and then decide further solution. Thanks for your tracking.

@HaxmCI HaxmCI added CI:Build Fail CI:Build Fail and removed CI:Build Pass CI:Build Pass CI:Mac Test Pass CI:Mac Test Pass labels May 24, 2021
@wcwang wcwang force-pushed the master branch 2 times, most recently from 563eb1b to 6b942e3 Compare November 25, 2022 03:23
@wcwang wcwang force-pushed the master branch 2 times, most recently from b73a231 to da1b8ec Compare January 26, 2023 02:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI:Build Fail CI:Build Fail
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants